package com.cn.web.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cn.domain.Order;

public class GetOrderListByConditionServlet extends BaseServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doPost(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String oid = request.getParameter("id");
		String receiver = request.getParameter("receiverName");
		List<Order> list = os.getOrderListByCondition(oid, receiver);
		request.setAttribute("list", list);
		request.getRequestDispatcher("/admin/orders/list.jsp").forward(request, response);
	}

}
